﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;


namespace devtm.AutoMapper
{

    public partial class ItemMap : INotifyPropertyChanged
    {


        internal sealed partial class SourceNamePropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceName");
            }
        }


        internal sealed partial class TargetNamePropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetName");
            }
        }


        internal sealed partial class LabelPropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("Label");
            }

        }


        internal sealed partial class SourceTypePropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceType");
            }

        }


        internal sealed partial class TargetTypePropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetType");
            }

        }


        internal sealed partial class TypeCastPropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, CastType oldValue, CastType newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TypeCast");
            }

        }


        internal sealed partial class CastPropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("Cast");
            }
        }


        internal sealed partial class EnablePropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("Enable");
            }
        }


        internal sealed partial class NeedMapPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("NeedMap");
            }
        }


        internal sealed partial class SourceIsPrimitivePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsPrimitive");
            }
        }


        internal sealed partial class SourceIsClassPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsClass");
            }
        }


        internal sealed partial class SourceIsInterfacePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsInterface");
            }
        }


        internal sealed partial class SourceIsAbstractPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsAbstract");
            }
        }


        internal sealed partial class SourceIsAnsiClassPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsAnsiClass");
            }
        }


        internal sealed partial class SourceIsArrayPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsArray");
            }
        }


        internal sealed partial class SourceIsEnumPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsEnum");
            }
        }


        internal sealed partial class SourceIsNestedPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsNested");
            }
        }


        internal sealed partial class SourceIsPublicPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsPublic");
            }
        }


        internal sealed partial class SourceIsSealedPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsSealed");
            }
        }


        internal sealed partial class SourceIsSerializablePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsSerializable");
            }
        }


        internal sealed partial class SourceIsEnumerablePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsEnumerable");
            }
        }


        internal sealed partial class IsRecursifPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("IsRecursif");
            }
        }


        internal sealed partial class SourceIsValueTypePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsValueType");
            }
        }


        internal sealed partial class SourceIsNullablePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceIsNullable");
            }
        }


        internal sealed partial class TargetIsPrimitivePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsPrimitive");
            }
        }


        internal sealed partial class TargetIsClassPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsClass");
            }
        }


        internal sealed partial class TargetIsInterfacePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsInterface");
            }
        }


        internal sealed partial class TargetIsAbstractPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsAbstract");
            }
        }


        internal sealed partial class TargetIsAnsiClassPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsAnsiClass");
            }
        }


        internal sealed partial class TargetIsArrayPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsArray");
            }
        }

        internal sealed partial class TargetIsEnumPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("OnValueChanged");
            }
        }

        internal sealed partial class TargetIsNestedPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("");
            }
        }


        internal sealed partial class TargetIsPublicPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsPublic");
            }
        }

        internal sealed partial class TargetIsSealedPropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsSealed");
            }

        }


        internal sealed partial class TargetIsSerializablePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsSerializable");
            }
        }


        internal sealed partial class TargetIsEnumerablePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("");
            }
        }


        internal sealed partial class TargetIsValueTypePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsValueType");
            }
        }


        internal sealed partial class TargetIsNullablePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetIsNullable");
            }
        }


        internal sealed partial class SourceTypeMemberPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, MemberTypeEnum oldValue, MemberTypeEnum newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceTypeMember");
            }
        }


        internal sealed partial class TargetTypeMemberPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, MemberTypeEnum oldValue, MemberTypeEnum newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetTypeMember");
            }
        }


        internal sealed partial class CustomMethodNamePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("CustomMethodName");
            }
        }


        internal sealed partial class NullPolicyPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, PolicyNullValue oldValue, PolicyNullValue newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("NullPolicy");
            }
        }


        internal sealed partial class SourceItemTypePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceItemType");
            }
        }


        internal sealed partial class TargetItemTypePropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetItemType");
            }
        }


        internal sealed partial class CastReturnCustomMethodPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, bool oldValue, bool newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("CastReturnCustomMethod");
            }
        }


        /// <summary>
        /// Value handler for the ItemMap.ConditionnalMappingMethod domain property.
        /// </summary>
        internal sealed partial class ConditionnalMappingMethodPropertyHandler
        {

            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("ConditionnalMappingMethod");
            }
        }


        internal sealed partial class TargetAsPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetAs");
            }
        }


        internal sealed partial class SourcePropertiesPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("SourceProperties");
            }
        }


        internal sealed partial class TargetPropertiesPropertyHandler
        {
            protected override void OnValueChanged(ItemMap element, string oldValue, string newValue)
            {
                base.OnValueChanged(element, oldValue, newValue);
                element.PropertyChange("TargetProperties");
            }
        }


        protected void PropertyChange(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}

